package com.springbootsys.service.impl;

import com.springbootsys.entity.Menu;
import com.springbootsys.mapper.MenuMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/menu")
public class MenuServiceImpl{
    @Resource
    private MenuMapper menuMapper;


    @GetMapping("getMenusByUserId")
    public List<Menu> getMenusByUserId(@RequestParam("userId") Integer userId) {
        return menuMapper.getMenusByUserId(userId);
    }
}
